
#pragma once

#include <WinDef.h>

#include "Core\Bindable.h"

struct ID3D11Buffer;

class IndexBuffer : public Bindable
{
public:
	IndexBuffer(LPVOID data, UINT count);
	~IndexBuffer();

	// Management
	//-----------------------------------------------
	BOOL IsBinded() CONST;

	BOOL Bind();
	VOID Unbind();
	
	VOID Enable();
	
	// Getters & setters
	//-----------------------------------------------
	UINT Size() CONST;

protected:
	IndexBuffer(CONST IndexBuffer&);
	IndexBuffer& operator = (CONST IndexBuffer&);

private:
	// Attributes
	//-----------------------------------------------
	// Data
	LPVOID				 m_data;
	UINT				 m_count;

	// Buffers.
	ID3D11Buffer*        m_buffer;

	// Flags
	BOOL				 m_binded;
};
